import {
    HTTP
} from '../utils/http.js'
import {
    urlapi
} from '../apiconfig.js'

class shareModel extends HTTP {
    //获取分类
    getCategory(token) {
        return this.request({
            url: urlapi.category,
            data: {
                token: token
            }
        })
    }

    //获取列表
    getExperiencelist(token, page = 1, cid = 1) {
        return this.request({
            url: urlapi.experiencelist,
            data: {
                token: token,
                page: page,
                cid: cid
            }
        })
    }

    //获取分享详情
    getExperiencedetail(token, id) {
        return this.request({
            url: urlapi.experiencedetail,
            data: {
                token: token,
                id: id
            }
        })
    }

    //获取分享详情
    getExperiencesubmit(token, cid, title, thumb, content, uid) {
        return this.request({
            url: urlapi.experiencesubmit,
            data: {
                token: token,
                cid: cid,
                title: title,
                thumb: thumb,
                content: content,
                uid: uid
            }
        })
    }
    //获取分享详情
    getUploadthumb(token, imgData) {
        return this.request({
            url: urlapi.uploadthumb,
            data: {
                token: token,
                imgData: imgData
            }
        })
    }

}

export {
    shareModel
}
